package cn.iocoder.yudao.framework.business.eligibility.pojo.form;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.framework.validation.ChineseName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.AssertTrue;
import lombok.Data;

import java.io.Serializable;

@Data
public abstract class EligibilityApplySaveDTO implements Serializable {

    @Schema(description = "负责人姓名", example = "羡民")
    @ChineseName
    private String contactName;

    @SuppressWarnings("unused")
    @AssertTrue(message = "负责人姓名不能为空")
    public boolean validContactName() {
        return StrUtil.isNotBlank(contactName);
    }

    @Schema(description = "负责人电话", example = "15285116029")
    @Mobile
    private String contactMobile;

    @SuppressWarnings("unused")
    @AssertTrue(message = "负责人电话不能为空")
    public boolean validContactMobile() {
        return StrUtil.isNotBlank(contactMobile);
    }

}